package com.doubao.doubao_admin.exception;

import com.doubao.doubao_admin.common.ResultStatusCode;


public class ApiException extends RuntimeException {
    private ResultStatusCode errorCode;

    public ApiException(ResultStatusCode errorCode) {
        super(errorCode.getMsg());
        this.errorCode = errorCode;
    }

    public ApiException(String message) {
        super(message);
    }

    public ResultStatusCode getErrorCode() {
        return errorCode;
    }
}
